package com.student_exam_system.dao;

import com.student_exam_system.pojo.PaperQuestion;
import org.apache.ibatis.annotations.Param;

/**
 * @author fire'ge
 */
public interface PaperQuestionMapper {
    /**添加一个PaperQuestion
     * @param paperQuestion 传入paperQuestion类
     * @return int
     */
    int addPaperQuestion(PaperQuestion paperQuestion);
    /**根据id删除一个PaperQuestion
     * @param id 传入id
     * @return int
     */
    int deletePaperQuestionById(int id);

    /**更新PaperQuestion
     * @param paperQuestion 传入paperQuestion类
     * @return int
     */
    int updatePaperQuestion(PaperQuestion paperQuestion);
    /**根据id查询,返回一个PaperQuestion
     * @param id 传入id
     * @return int
     */
    PaperQuestion queryPaperQuestionById(int id);

    /**根据paper和question查询PaperQuestion,返回paperQuestion
     * @param pqQuestion 试题的id
     * @param pqPaper 试卷的id
     * @return PaperQuestion
     */
    int
    queryPaperQuestionByPaperAndQuestion(@Param("pqQuestion") int pqQuestion,@Param("pqPaper") int pqPaper);


}
